package com.xuanyang.dormrepair.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xuanyang.dormrepair.model.enums.MaintainerStatus;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * @author 
 */
@Data
@Accessors(chain = true)
@TableName(value = "maintainer", resultMap = "com.xuanyang.dormrepair.model.mapper.MaintainerMapper.joinFloors")
public class Maintainer {
    @TableId
    private Integer id;

    /**
     * 姓名
     */
    private String name;

    /**
     * 工人状态 是不是还在工作
     */
    private MaintainerStatus status;

    /**
     * 性别 1男 2女
     */
    private Integer sex;

    /**
     * 电话
     */
    private String tel;

    private String email;

    /**
     * 负责的楼层
     */
    @TableField(exist = false)
    private String[] fs;

    /**
     * 加入时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date datetime;
}